Skip to content

Add async span context manager #4680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2025
Merged

Conversation

srothh
Copy link
Member

@srothh srothh commented Aug 6, 2025

Add an async span context manager to allow for cleaner nesting in async code. Currently only delegates to the synchronous context manager.

Fixes GH-2007

Add an async span context manager to allow for cleaner nesting in async code. Currently only delegates to the synchronous context manager.

GH-2007
@srothh
Copy link
Member Author

srothh commented Aug 6, 2025

Linter error seems unrelated

Copy link

codecov bot commented Aug 6, 2025

❌ 17 Tests Failed:

Tests completed Failed Passed Skipped
20843 17 20826 1098
View the top 3 failed test(s) by shortest run time
tests.integrations.redis.test_redis::test_data_truncation_custom
Stack Traces | 0.085s run time
.../integrations/redis/test_redis.py:205: in test_data_truncation_custom
    connection = FakeStrictRedis()
.tox/py3.11-redis-v4/lib/python3.11.../site-packages/fakeredis/_connection.py:185: in __init__
    super().__init__(**kwds)
E   TypeError: Redis.__init__() got an unexpected keyword argument 'lib_name'
tests.integrations.redis.test_redis_cache_module::test_cache_data
Stack Traces | 0.085s run time
.../integrations/redis/test_redis_cache_module.py:125: in test_cache_data
    connection = FakeStrictRedis(host="mycacheserver.io", port=6378)
.tox/py3.11-redis-v4/lib/python3.11.../site-packages/fakeredis/_connection.py:185: in __init__
    super().__init__(**kwds)
E   TypeError: Redis.__init__() got an unexpected keyword argument 'lib_name'
tests.integrations.redis.test_redis_cache_module::test_no_cache_basic
Stack Traces | 0.085s run time
.../integrations/redis/test_redis_cache_module.py:26: in test_no_cache_basic
    connection = FakeStrictRedis()
.tox/py3.11-redis-v4/lib/python3.11.../site-packages/fakeredis/_connection.py:185: in __init__
    super().__init__(**kwds)
E   TypeError: Redis.__init__() got an unexpected keyword argument 'lib_name'

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@srothh srothh marked this pull request as ready for review August 6, 2025 14:45
@srothh srothh requested a review from a team as a code owner August 6, 2025 14:45
@sentrivana
Copy link
Contributor

Re: linter, try merging potel-base into this first to see if there's already a fix for it -- if not maybe fix it here anyways

@srothh
Copy link
Member Author

srothh commented Aug 14, 2025

Merging potel-base seems to have increased the error count, but the original error is no longer here, so I am assuming it was unrelated. I can check if I find the reason for the new stuff (This also seems to be failing on my other branches)

@srothh srothh merged commit c8d5799 into potel-base Aug 14, 2025
121 of 125 checks passed
@srothh srothh deleted the srothh/async-span-context-manager branch August 14, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants